﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DLM.Infrastructure.Domain;

namespace DLM.Domain.Model
{
    public class PartyAlbum : IValidatableObject, IAggregateRoot
    {

        public int PAID { get; set; }

        public int PartyID { get; set; }

        public string Account { get; set; }

        public string PhotoName { get; set; }

        public DateTime CreateDate { get; set; }

        public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
        {
            if (string.IsNullOrEmpty(PhotoName))
            {
                yield return new ValidationResult("照片不允许为空", new string[] { "PhotoName" });
            }
        }
    }
}
